<?php
function smarty_function_article_pages($params, &$smarty)
{
	include($_ENV['webpath']."pages.php");
	
	$art_posfix=$params['postfix']?$params['postfix']:'.htm';
	$subPages=new SubPages($params['page_size'],$params['totalnums'],$params['current_page'],$params['sub_pages'],"index_",2,$art_posfix);
	$pagestr=$subPages->getstr();
	
	if (empty($params['assign'])) {
		return $pagestr;
	} else {
		$smarty->assign($params['assign'],$pagestr);
	}
	mysql_close($conn);
}
?>
